package cc.comac.mom.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipAsrFeaturesService;
import cc.comac.mom.bean.QualityAsrFeatures;
import cc.comac.mom.util.ResultBean;

@RestController
@RequestMapping("/EquipAsrFeatures")
public class EquipAsrFeaturesController {

	@Autowired
	private EquipAsrFeaturesService equipAsrFeaturesService;

	@RequestMapping(value = "/insert",method = RequestMethod.POST)
	public ResultBean insert(@RequestBody QualityAsrFeatures equipAsrFeatures) {
		ResultBean insert = equipAsrFeaturesService.insert(equipAsrFeatures);
		return insert;
	}

	@RequestMapping(value = "/insertBatch",method = RequestMethod.POST)
	public Object insertBatch(@RequestBody List<QualityAsrFeatures> equipAsrFeaturesList) {
		ResultBean insertBatch = equipAsrFeaturesService.insertBatch(equipAsrFeaturesList);
		return insertBatch;
	}
	
	@RequestMapping(value = "/update",method = RequestMethod.POST)
	public ResultBean update(@RequestBody QualityAsrFeatures equipAsrFeatures) {
			ResultBean update = equipAsrFeaturesService.update(equipAsrFeatures);
		return update;
	}

	// 分页查询所有
	@RequestMapping(value = "/selectAllByPage",method = RequestMethod.POST)
	public ResultBean selectAllByPage(@RequestBody QualityAsrFeatures equipAsrFeatures) {
			ResultBean selectAllByPage = equipAsrFeaturesService.selectAllByPage(equipAsrFeatures);
		return selectAllByPage;
	}
	
	@RequestMapping(value = "/batchDelete",method = RequestMethod.POST)
	public Object batchDelete(@RequestBody List<QualityAsrFeatures> equipAsrFeaturesList) {
			ResultBean batchDelete = equipAsrFeaturesService.batchDelete(equipAsrFeaturesList);
		return batchDelete;
	}
}
